package com.wffz.service.impl;

import com.wffz.mapper.RechargeOrderMapper;
import com.wffz.po.RechargeOrder;
import com.wffz.service.RechargeOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author sunlei
 * @className RechargeOrderServiceImpl
 * @Description
 * @date 2023-04-23 14:06
 **/
@Service
@Slf4j
public class RechargeOrderServiceImpl implements RechargeOrderService {

    @Autowired
    private RechargeOrderMapper rechargeOrderMapper;

    @Override
    public boolean saveRechargeOrder(RechargeOrder rechargeOrder) {
        return rechargeOrderMapper.insert(rechargeOrder) > 0;
    }

    @Override
    public boolean updateRechargeOrder(RechargeOrder rechargeOrder) {
        return rechargeOrderMapper.updateById(rechargeOrder) > 0;
    }

    @Override
    public RechargeOrder queryRechargeOrderByOrderId(Long id) {
        return rechargeOrderMapper.selectById(id);
    }
}
